package com.zunipe.screen;

import net.minecraft.client.gui.widget.OptionSliderWidget;
import net.minecraft.client.option.GameOptions;

public class ScreenUtil
{
    public static class OptionSlider extends OptionSliderWidget
    {
        OptionSliderWidgetInterface f;
        OptionSliderWidgetInterface z;

        protected OptionSlider(int x, int y, int width, int height, double value, OptionSliderWidgetInterface f, OptionSliderWidgetInterface z)
        {
            super(null, x, y, width, height, value);
            this.f = f;
            this.z = z;
            this.updateMessage();
        }

        @Override
        public void updateMessage()
        {
            f.message(this);
        }

        @Override
        public void applyValue()
        {
            z.message(this);
        }

        public double getValue()
        {
            return this.value;
        }
    }

    public interface OptionSliderWidgetInterface
    {
        void message(OptionSlider p);
    }
}
